home *** CD-ROM | disk | FTP | other *** search
- -- card: 16385 from stack: in.3r
- -- bmap block id: 0
- -- flags: 4000
- -- background id: 2202
- -- name: FileAtRoot
- ----- HyperTalk script -----
- function FileAtRoot name
- put NumberOfChars(":",name) into colonCount
- if colonCount is 0 then
- return false
- end if
- if colonCount is 1 then
- if FileModDate(name,true) is not empty then -- empty = file not fnd.
- return true
- else
- return false
- end if
- else
- return false
- end if
- end FileAtRoot
-
-
- -- part contents for background part 10
- ----- text -----
- 4
-
- -- part contents for background part 2
- ----- text -----
- --
- -- FileAtRoot: a function that determines if a file is present at
- -- the root of a volume (i.e. not buried in a folder somewhere).
- --
- function FileAtRoot name
- put NumberOfChars(":",name) into colonCount
- if colonCount is 0 then
- -- No colon in filename, needs expanding before calling this
- -- function!
- return false
- end if
-
- -- At least 1 colon. If there's more it's not at the root
- if colonCount is 1 then
- -- If the file exists, it's at the root.
- if FileModDate(name,true) is not empty then -- empty = file not fnd.
- return true
- else
- return false
- end if
- else
- return false
- end if
- end FileAtRoot
-
- -- part contents for background part 3
- ----- text -----
- FileAtRoot
-
- -- part contents for background part 19
- ----- text -----
- Functions